#!/bin/bash
#
# 08/03/2012 - created

TMP_DIR=/tmp



mkdir ${TMP_DIR}/nginx
cd ${TMP_DIR}/nginx

tar xf ${TMP_DIR}/nginx.tar

sudo cp nginx.repo /etc/yum.repos.d/

# install nginx
sudo yum -y install nginx

# configure nginx
sudo cp default.conf.* /etc/nginx/conf.d/default.conf


# startup nginx
sudo /etc/init.d/nginx start


# clean up installation file from local host
cd ${TMP_DIR}
rm -rf ${TMP_DIR}/nginx

exit
